package com.wave.spring.web.controller;

import com.wave.spring.web.anno.MyGet;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HomeController {

    @MyGet(path = "/")
    public String home( Model model){


        model.addAttribute("m","model");
        return "Welcome" ;
    }

    @RequestMapping(value = "normal")
    public String normal( Model model){

        model.addAttribute("m","model");
        return "demo";
    }

    @RequestMapping("/page/{path}")
    public String path(@PathVariable String path){
        return "page/" +path;
    }
}
